<?php get_instance()->view('common/header');?>
<div class="page-container home">
    <?php get_instance()->view('common/sidebar');?>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                    <h3 class="page-title"> <?php echo $title ?> </h3>
                    <ul class="page-breadcrumb breadcrumb">
                        <li><i class="fa fa-home"></i><a href="javascript:void(0);"><?php echo $title ?> </a></li>
                    </ul>
                    <!-- END PAGE TITLE & BREADCRUMB-->
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet">
                        <div class="portlet-body">
                            <div class="table-container">
                                <table class="table table-bordered table-hover" id="datatable_ads">
                                    <thead>
                                    <tr role="row" class="heading">
                                        <th sort="false">商家</th>
                                        <th> 申请位置 </th>
                                        <th sort="false">申请周期（天）</th>
                                        <th width="25%" sort="false">申请时间</th>
                                        <th sort="false">当前状态</th>
                                        <th width="150px" sort="false">操作</th>
                                    </tr>
                                    <tr>
                                        <th><input class="form-control form-filter input-sm" name="name" type="text"></th>
                                        <th>
                                            <select name="ad_position" class="form-control form-filter input-sm">
                                                <option value="" selected="selected">所有</option>
                                                <?php foreach ($position as $k =>$v):?>
                                                    <option value="<?php echo $k?>"><?php echo $v?></option>
                                                <?php endforeach;?>
                                            </select>
                                        </th>
                                        <th></th>
                                        <th>
                                            <input class="form-control form-filter input-sm" name="ads_send_date_from" dp placeholder="从" type="text" style="float: left;width: 50%">
                                            <input class="form-control form-filter input-sm" name="ads_send_date_to" dp placeholder="到" type="text" style="float: left;width: 50%">
                                        </th>
                                        <th>
                                            <select name="ads_status" class="form-control form-filter input-sm">
                                                <option value="" selected="selected">所有</option>
                                                <option value="1">申请中</option>
                                                <option value="2">已投放</option>
                                                <option value="2">已过期</option>
                                                <option value="2">已拒绝</option>
                                            </select>
                                        </th>
                                        <th> <div class="btn-group">
                                                <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                <ul role="menu" class="dropdown-menu pull-right">
                                                    <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                </ul>
                                            </div>
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody></tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php get_instance()->view('config/ads_refuse_form.php');?>
<script type="text/javascript">
    $(function(){
        datatable_init({
            src: $("#datatable_ads"),
            sAjaxSource: "<?php echo getUrl('config/applyads/getList');?>",
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [0,1,4,5]
            }]
        });
        $('[dp]').not("[noinit]").datepicker({
            changeMonth: true,
            autoclose: true,
            format: "yyyy-mm-dd",
            language: 'zh-CN'
        });
    });
</script>
</body>
</html>